package my.news;

import java.util.Iterator;
import java.util.List;
import java.util.Set;

/**
 *
 * @author yura
 */
public class PipeLineProcessor implements DocumentSetProcessor {

    public List<DocumentSetProcessor> processors;



    public PipeLineProcessor(List<DocumentSetProcessor> processors) {
        super();
        this.processors = processors;
    }



    public Set<Content> process(Set<Content> contents) {
        Set<Content> result = contents;
        for(DocumentSetProcessor proc : processors) {
            result = proc.process(result);
        }
        return result;
    }
}
